package com.aim.common.enums;

/**
 * @AUTO 用户状态
 * @Author AIM
 * @DATE 2019/4/23
 */
public enum UserStatusEnum {

    OK("ENABLE", "启用"), FREEZED("LOCKED", "冻结"), DELETED("DELETED", "被删除");

    String code;
    String message;

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    UserStatusEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public static String getDescription(String value) {
        if (value == null) {
            return "";
        } else {
            for (UserStatusEnum ms : UserStatusEnum.values()) {
                if (ms.getCode().equals(value)) {
                    return ms.getMessage();
                }
            }
            return "";
        }
    }
}
